const initialState = {
  grossingAppsList: [],
  grossing10AppsList: [],
  top100List: [],
  top10List: [],
};

const Home = (state = initialState, actions) => {
  switch (actions.type) {
    case 'GROSSING_APPS':
      return Object.assign({}, state, { grossingAppsList: actions.val || [] });
    case 'GROSSING_TEN_APPS':
      return Object.assign({}, state, {
        grossing10AppsList: actions.val || [],
      });
    case 'TOP_FREE_APPS':
      return Object.assign({}, state, { top100List: actions.val || [] });
    case 'TOP_TEN_APPS':
      return Object.assign({}, state, { top10List: actions.val || [] });
    default:
      return state;
  }
};

export default Home;
